const TokenKey = 'App-Token'
const RefCodeKey  = 'User-RefCode'
export function getToken() {
  return uni.getStorageSync(TokenKey)
}

export function setToken(token) {
  return uni.setStorageSync(TokenKey, token)
}

export function removeToken() {
  return uni.removeStorageSync(TokenKey)
}

export function setTokenRefCode( res ) {
	uni.setStorageSync(RefCodeKey, res.refcode)
	return uni.setStorageSync(TokenKey, res.token)
}

export function getRefCode() {
  return uni.getStorageSync(RefCodeKey)
}
